﻿@using SuCasa.Infrastructure
@model SuCasa.Models.MemberDetailsViewModel
@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="row" style="padding-top: 20px;">
    <div class="span4">
        <div class="well" style="height: 200px;">
            Picture Goes Here</div>
    </div>
    <div class="span8">
        <table class="table table-striped table-bordered">
            <tr>
                <td>
                    Name
                </td>
                <td>@Html.DisplayFor(model => model.Name)
                </td>
            </tr>
            <tr>
                <td>
                    Address
                </td>
                <td>@Html.DisplayFor(model => model.Address)
                </td>
            </tr>
            <tr>
                <td>
                    Home Phone
                </td>
                <td>@Html.DisplayFor(model => model.HomePhone)
                </td>
            </tr>
            <tr>
                <td>
                    Cell Phone
                </td>
                <td>@Html.DisplayFor(model => model.CellPhone)
                </td>
            </tr>
            <tr>
                <td>
                    Email
                </td>
                <td>@Html.DisplayFor(model => model.Email)
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="row">
<div class="span12">
    <h2>
        Courses</h2>
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Semester
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (Course item in Model.Courses)
            {
                <tr>
                    <td>
                       @Html.ActionLink(@item.Name, "List", "Assignment", new { id = Model.MemberId, courseId = item.CourseId}, null)
                    </td>
                    <td>
                        @item.Semester
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
</div>
    @if (Model.Courses != null && Model.Children.Count() > 0)
    {
        <div class="row">
            <div class="span12">
                <h2>
                    Children</h2>
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th>
                                Name
                            </th>
                    
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (Member item in Model.Children)
                        {
                            <tr>
                                <td>
                                    @item.Name
                                </td>
                                
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
        </div>
    }
